package com.yoga.manager.beanUtil;

import com.yoga.common.bo.YogaAdminBO;
import com.yoga.dao.domain.YogaAdminDO;

/**
 * 类YogaAdminBeanUtil.java的实现描述：工具类
 * 
 * @Author hdx
 * @Date 2020年09月24日
 */
public class YogaAdminBeanUtil {

    private YogaAdminBeanUtil(){
    }

    public static YogaAdminDO yogaAdminBOToDO(YogaAdminBO srcObj) {
        if (srcObj == null) {
            return null;
        }
        YogaAdminDO targetObj = new YogaAdminDO();
        targetObj.setId(srcObj.getYogaAdminId());//id
        targetObj.setAdminNo(srcObj.getAdminNo());//登录账号
//        targetObj.setAdminPasswd(srcObj.getAdminPasswd());//登录密码
        targetObj.setAdminNick(srcObj.getAdminNick());//昵称
        targetObj.setAdminHeadImg(srcObj.getAdminHeadImg());//头像
        targetObj.setDeleteMark(srcObj.getDeleteMark());//0、正常，1、已删除
        targetObj.setCreateTime(srcObj.getCreateTime());
        targetObj.setUpdateTime(srcObj.getUpdateTime());
        return targetObj;
    }

    public static YogaAdminBO yogaAdminDOToBO(YogaAdminDO srcObj) {
        if (srcObj == null) {
            return null;
        }
        YogaAdminBO targetObj = new YogaAdminBO();
        targetObj.setYogaAdminId(srcObj.getId());//id
        targetObj.setAdminNo(srcObj.getAdminNo());//登录账号
        targetObj.setAdminPasswd(srcObj.getAdminPasswd());//登录密码
        targetObj.setAdminNick(srcObj.getAdminNick());//昵称
        targetObj.setAdminHeadImg(srcObj.getAdminHeadImg());//头像
        targetObj.setDeleteMark(srcObj.getDeleteMark());//0、正常，1、已删除
        targetObj.setCreateTime(srcObj.getCreateTime());
        targetObj.setUpdateTime(srcObj.getUpdateTime());
        return targetObj;
    }
}